#include "qmethodx.h"
#include "qmethodxplugin.h"

#include <QtCore/QtPlugin>

QMethodXPlugin::QMethodXPlugin(QObject *parent)
    : QObject(parent)
{
    m_initialized = false;
}

void QMethodXPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (m_initialized)
        return;

    // Add extension registrations, etc. here

    m_initialized = true;
}

bool QMethodXPlugin::isInitialized() const
{
    return m_initialized;
}

QWidget *QMethodXPlugin::createWidget(QWidget *parent)
{
    return new QMethodX(parent);
}

QString QMethodXPlugin::name() const
{
	return QLatin1String("QMethodX");
}

QString QMethodXPlugin::group() const
{
    return QLatin1String("");
}

QIcon QMethodXPlugin::icon() const
{
    return QIcon();
}

QString QMethodXPlugin::toolTip() const
{
    return QLatin1String("");
}

QString QMethodXPlugin::whatsThis() const
{
    return QLatin1String("");
}

bool QMethodXPlugin::isContainer() const
{
    return false;
}

QString QMethodXPlugin::domXml() const
{
	return QLatin1String("<widget class=\"QMethodX\" name=\"qMethodX\">\n</widget>\n");
}

QString QMethodXPlugin::includeFile() const
{
    return QLatin1String("qmethod.h");
}

Q_EXPORT_PLUGIN2(qmethodxplugin, QMethodXPlugin)
